package sk.naive.talker;

import sk.naive.talker.adapter.*;
import sk.naive.talker.callback.CallbackResult;
import sk.naive.talker.persistence.PersistenceException;
import sk.naive.talker.props.RemotePropertyConfiguration;

import java.rmi.*;

/**
 *
 * @author <a href="mailto:virgo@naive.deepblue.sk">Richard "Virgo" Richter</a>
 * @version $Revision: 1.16 $ $Date: 2004/10/09 23:03:59 $
 */
public interface RemoteTalker
	extends Remote
{
	public static final String NAME = "talker";

	public void registerAdapter(Adapter adapter, RemotePropertyConfiguration rpc) throws RemoteException;
	public void deregisterAdapter(Adapter adapter) throws RemoteException;
	public void userIn(AdapterUser u) throws RemoteException, AuthenticationException, PersistenceException;
	public void userOut(AdapterUser u) throws RemoteException;

	public void processUserMessage(AdapterUser u, String message) throws RemoteException;
	public String processSystemMessage(String message) throws RemoteException;
	public void processUserCallback(AdapterUser u, CallbackResult result) throws RemoteException;
}
